package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.Media;
import org.tgcloud.group.web.controller.dto.media.MediaAppBriefDTO;
import org.tgcloud.group.web.controller.dto.media.MediaDTO;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-02-27-下午3:59
 * @Description: ${description}
 */
public interface MediaMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Media record);

    int insertSelective(Media record);

    Media selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Media record);

    int updateByPrimaryKey(Media record);

    List<MediaDTO> selectManageList(@Param("keyword") String keyword, @Param("mediaType") Integer mediaType);

    int updateStatusById(@Param("id") int id, @Param("status") short status);

    int insertBatch(@Param("list") List<Media> mediaList);

    List<MediaDTO> selectAppList();

    Media selectMsgById(@Param("id") Integer id);

    List<Media> selectAllTestList();

    List<Media> selectAllProdList();

    List<Media> selectAllNoLatList();

    int updateLatAndLonById(@Param("id") Integer id, @Param("latitude") String latitude, @Param("longitude") String longitude, @Param("otherMsg") String otherMsg);

    List<MediaAppBriefDTO> selectAppBriefList(@Param("mediaIdList") List<Integer> mediaIdList, @Param("mediaTypes") String[] mediaTypes);

    List<MediaDTO> selectAppMsgByIds(@Param("ids") String[] ids);

    List<MediaDTO> selectAppListByRadius(@Param("mediaIdList") List<Integer> mediaIdList,
                                         @Param("keywords") String keywords, @Param("mediaTypes") String[] mediaTypes,
                                         @Param("addresses") String[] addresses, @Param("numberOfMedias") String[] numberOfMedias,
                                         @Param("titles") String[] titles);

    List<MediaAppBriefDTO> selectAllTestList2();

    Media selectTestOne();

    List<Media> selectUpdateList(@Param("beforeLat") String beforeLatitude,
                                 @Param("beforeLon") String beforeLongitude,
                                 @Param("channelName") String channelName);

    List<Integer> selectListByMediaTypeAndChannelName(@Param("mediaType") Integer mediaType,
                                                    @Param("channelName") String channelName);

    List<Integer> selectListByMediaTypeAndChannelNameAndCityList(@Param("mediaType") Integer mediaType,
                                                      @Param("channelName") String channelName,
                                                      @Param("cityList") String[] cityList);

    int updateStatusByIds(@Param("ids") List<Integer> ids, @Param("status") short status);

    List<Integer> selectListByChannelName(@Param("channelName") String channelName);
}